Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I was lacking field for formatted text, so I added it :) It's not finished yet, but main functionality is there - you can add text field in Masquerade admin, you can fill it in user profile (with live preview of formatting) and it will display for other users formatted in this person profile.
I would just like to get help how to properly finish it:
As I understand, Flarum is storing formatted text to database in some intermediate XML format. But that seemed a bit too complicated so I'm storing original text with unrendered formatting directly into database. Is it OK? Why is storing Flarum formatted text as XML? Is there some security reason?
I have a little trouble with serializing Answer. I need to get field type in order to know if I need to render value into HTML or not. The way I currently do it seems a bit dirty.
Preview is rendering fine even with
fof/upload
extension, but final backend rendering does not knowfof/upload
format. How can I make backend HTML render to work withfof/upload
format?Please let me know if you can help me with any of that and what is your opinion on this new field.